﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace API.Models
{
    public class DbViewClasses
    {
    }

    public class ITEM_COMPANY
    {
        public Guid COMPANY_GUID { get; set; }
        public string COMPANY_NAME { get; set; }
        public Guid ITEM_GUID { get; set; }
        public string ITEM_NAME { get; set; }
    }

    public class ITEM_COMPANY_MAP
    {
        public Guid COMPANY_GUID { get; set; }
        public string COMPANY_NAME { get; set; }
        public Guid ITEM_GUID { get; set; }
        public string ITEM_NAME { get; set; }
        public Guid? MAP_ITEM_GUID { get; set; }
        public string MAP_ITEM_NAME { get; set; }
    }

    public class ITEM_MAP
    {
        public Guid LEFT_ITEM_GUID { get; set; }
        public Guid RIGHT_ITEM_GUID { get; set; }
    }

    public class LOCATION_MAP
    {
        public WH_LOCATIONS LEFT_LOCATION_MAP { get; set; }
        public WH_LOCATIONS RIGHT_LOCATION_MAP { get; set; }
    }

    public class COMPANY_MAP
    {
        public WH_COMPANIES LEFT_COMPANY_MAP { get; set; }
        public WH_COMPANIES RIGHT_COMPANY_MAP { get; set; }
    }

    public class API_SESSION
    {
        public Guid USER_GUID { get; set; }
        public Guid COMPANY_GUID { get; set; }

        public string USERNAME { get; set; }
        public string EMAIL { get; set; }

        public string COMPANYNAME { get; set; }
        public string COMPANY_KEY { get; set; }

        public DateTime LOGON_DATETIME { get; set; }
        public string APIKEY { get; set; }
    }

    /*
    [System.ComponentModel.DataAnnotations.Schema.Table("SEC_USERS")]
    public class USERS : CommonDbClass, ICommonDbClass
    {
        public string FIRSTNAME { get; set; }
        public string LASTNAME { get; set; }
        public string MIDNAME { get; set; }
        public string USERNAME { get; set; }
    }
    */

    public interface IInvoices : ICommonDbClass
    {
        short VERSION { get; set; }
        string DOC_ID { get; set; }
        string DOC_NUMBER { get; set; }
        DateTime DOC_DATE { get; set; }

        Guid COMPANY_GUID { get; set; }
        Guid CUSTOMER_GUID { get; set; }
        Guid? LOCATION_GUID { get; set; }

        short LINECOUNT { get; set; }
        decimal TOTAL_AMOUNT { get; set; }
        decimal TAX_AMOUNT { get; set; }
        string NOTE { get; set; }

        WH_COMPANIES COMPANY { get; set; }
        WH_COMPANIES CUSTOMER { get; set; }
        WH_LOCATIONS LOCATION { get; set; }

        ICollection<IInvoicesLines> LINES { get; set; }
    }

    public interface IInvoicesLines : ICommonDbClass
    {
        Guid INVOICE_GUID { get; set; }
        Guid? ITEM_GUID { get; set; }
        decimal PRICE { get; set; }
        decimal QUANTITY { get; set; }

        WH_ITEMS ITEM { get; set; }
    }




}